var objById=document.getElementById("province");
console.log(typeof objById);
console.log(objById);



var objByTagName=document.getElementsByTagName("li");
console.log(typeof objByTagName);
for (var i=0;i<objByTagName.length;i++){
    console.log(typeof objByTagName[i]) ;

}

var objByClassName=document.getElementsByClassName("cur");
console.log(typeof objByClassName);
for (var i=0;i<objByClassName.length;i++){
    console.log(typeof objByClassName[i]) ;

}



function  traversal(node) {
    if (node&&node.nodeType===1){
        console.log(node.nodeName)
    }

var  childNodes=node.childNodes;
for (var  i=0;i<childNodes.length;i++){
   var  item=childNodes[i];
   if (item.nodeType===1){
   traversal(item);
   }
}
}

traversal(document.documentElement);


var  objP=document.getElementsByTagName("p")
for (var  i=0;i<objP.length;i++){
    var  txtTitle=objP[i].getAttribute("title");
    console.log(txtTitle);
}


document.getElementById("privince").setAttribute("title","省份列表");